﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="Code.Models" %>
<%
    this.ViewContext.RouteData.Values.Remove("id");
    string col = Request["cont"] ?? ViewData["controller"] as string,
        act = Request["act"] ?? ViewData["action"] as string;
    var us=Context.User;
    Func<string, string, string> ckmenu = (col1, act1) => col1.Equals(col, StringComparison.CurrentCultureIgnoreCase) && act1.Equals(act, StringComparison.CurrentCultureIgnoreCase) ? "left_menu_sub_current" : null;
%>

<div class="left_div_body">
    <div class="left_div_menu">
        <div class="left_menu_bar">
            用户管理
        </div>
        <div id="left_menu_sub_1" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                       <%=Html.ActionLink("添加会员", "Add", "User", new {Authorize=us.IsInRole("Manager_User_Add") ,@class = ckmenu("User", "Add") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("用户管理", "AllUser", "User", new { Authorize = us.IsInRole("Manager_User_Add") || us.IsInRole("Manager_User_Delete") || us.IsInRole("Manager_User_WinMoney") || us.IsInRole("Manager_User_Edit") || us.IsInRole("Manager_User_Select"),
                            @class = ckmenu("User", "AllUser") ?? ckmenu("User", "Chage") ?? ckmenu("User", "Manage_Detail") ?? ckmenu("User", "WinMoney") ?? ckmenu("User", "SetWinMoney") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <% var value = TempData["DeleteType"]; var type = value == null ? 0 : (short)value; %>
                        <%=Html.ActionLink("删除用户", "Delete", "User", new { DeleteType = 1 }, new {Authorize=us.IsInRole("Manager_User_Delete") , @class = type != 1 ? "" : ckmenu("User", "Delete") })%>
                    </td>
                    <td width="49%" colspan='2'>
                        <%=Html.ActionLink("删除无账变", "Delete", "User", new { DeleteType = 2 }, new {Authorize=us.IsInRole("Manager_User_Delete") , @class = type != 2 ? "" : ckmenu("User", "Delete") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("用户一览", "ChildView", "User", new { @class = ckmenu("User", "ChildView") })%>
                    </td>
                    <td width="49%" colspan='2'>
                        <%=Html.ActionLink("登录用户", "Login", "User", new { Authorize = us.IsInRole("Manage_User_Login"), @class = ckmenu("User", "Login") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("配额设置", "SetAddChildConfig", "User", new { Authorize = us.IsInRole("Manager_User_Edit"), @class = ckmenu("User", "SetAddChildConfig") })%>
                    </td>
                    <td width="49%" colspan='2'>
                      <%=Html.ActionLink("等级相关", "Rank", "User", new { Authorize = us.IsInRole("Manager_User_Edit"), @class = ckmenu("User", "Rank") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            彩票管理
        </div>
        <div id="left_menu_sub_3" class="left_menu_sub">
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("期号管理", "Index","Issue", new { Authorize=us.IsInRole("Manager_Lottery_Config") ,@class = ckmenu("Issue", "Index") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("奖金设置", "ConfigWinMoney", "Lottery", new { Authorize=us.IsInRole("Manager_Lottery_Config") ,@class = ckmenu("Lottery", "ConfigWinMoney") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("彩种设置", "ConfigLottery", "Lottery", new { Authorize=us.IsInRole("Manager_Lottery_Config") ,@class = ckmenu("Lottery", "ConfigLottery") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("玩法设置", "ConfigPlayType", "Lottery", new {Authorize=us.IsInRole("Manager_Lottery_Config") , @class = ckmenu("Lottery", "ConfigPlayType") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("购彩明细", "Index", "Scheme", new {Authorize=us.IsInRole("Manager_Lottery_Open") , @class = ckmenu("Scheme", "Index")??ckmenu("Scheme", "Detail") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("追号明细", "Index", "ChaseTask", new { Authorize=us.IsInRole("Manager_Lottery_Open") ,@class = ckmenu("ChaseTask", "Index")??ckmenu("ChaseTask", "Detail") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("开 奖", "KaiJiang", "Lottery", new { Authorize=us.IsInRole("Manager_Lottery_Open") ,@class = ckmenu("Lottery", "KaiJiang") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("出 票", "ChuPiao", "Lottery", new { Authorize=us.IsInRole("Manager_Lottery_Open") ,@class = ckmenu("Lottery", "ChuPiao") })%>
                    </td>
                </tr>
                <tr>
                  <td width="49%">
                        <%=Html.ActionLink("奖金调整", "ResetWinMoney", "Lottery", new { Authorize = us.IsInRole("Manager_Lottery_Config"), @class = ckmenu("Lottery", "ResetWinMoney") })%>
                    </td>
                    <td width="49%">
                      <%=Html.ActionLink("返点类型", "BackMoneyType", "Lottery", new { Authorize = us.IsInRole("Manager_Lottery_Config"), @class = ckmenu("Lottery", "BackMoneyType") ?? ckmenu("Lottery", "AddBackMoneyType") }) %>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            财务中心
        </div>
        <div id="left_menu_sub_4" class="left_menu_sub">
            <table width="100%" border="0">
                <%var AccountReport_Serch_Type = Request["arst"] ?? (TempData["Surrogate_AccountReport_Serch.Type"] ?? string.Empty).ToString(); %>
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;<%=Html.ActionLink("用户账户", "AccountReport", "User", Url.Route(null), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") , @class = ckmenu("User", "AccountReport") ?? ckmenu("User", "AccountReportDetail") }))%>
                    </th>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("所有明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "" } }), Url.Route(new { Authorize = us.IsInRole("Manager_Account_Report"), @class = (AccountReport_Serch_Type == "" || AccountReport_Serch_Type == "Freez") ? ckmenu("User", "AccountDetail") : "" }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("账户余额", "GroupMoney", "User", Url.Route(null), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") ,  @class = ckmenu("User", "GroupMoney") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("购彩明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "Play" } }), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") ,  @class = AccountReport_Serch_Type != "Play" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("撤单明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "QuashScheme" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "QuashScheme" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("提款明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "TackMoney" } }), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") ,  @class = AccountReport_Serch_Type != "TackMoney" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("充值明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "AddMoney" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "AddMoney" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("返点明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "BackMoney" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "BackMoney" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("下级返点", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "BackMoney_Child" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "BackMoney_Child" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("中奖明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "WinMoney" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "WinMoney" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("返奖明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "WinMoney_Child" } }), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") ,  @class = AccountReport_Serch_Type != "WinMoney_Child" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("追号明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "ChaseTask" } }), Url.Route(new {Authorize=us.IsInRole("Manager_Account_Report") ,  @class = AccountReport_Serch_Type != "ChaseTask" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("其它明细", "AccountDetail", "User", Url.Route(new { Serch = new { Type = "Other" } }), Url.Route(new { Authorize=us.IsInRole("Manager_Account_Report") , @class = AccountReport_Serch_Type != "Other" ? "" : ckmenu("User", "AccountDetail") }))%>
                    </td>
                </tr>
                <tr>
                    <th colspan="2" align="left">
                        &nbsp;<%=Html.ActionLink("公司账户", "Index", "Account", null, new { Authorize = us.IsInRole("Manager_Account_Report"),@class=ckmenu("Account","Index") })%>
                    </th>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("提款申请", "TakeMoneyDetail", "User", new { Authorize = us.IsInRole("Manager_Account_TakeMoney"), @class = ckmenu("User", "TakeMoneyDetail") ?? ckmenu("User", "Dispose") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("手工充值", "AddMoney", "User", new {Authorize=us.IsInRole("Manager_Account_AddMoney") ,  @class = ckmenu("User", "AddMoney") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("转账充值", "TransferAccount", "User", Url.Route(new { Serch = new { Result=PayResult.WatingPay.ToString() } }), Url.Route(new { Authorize = us.IsInRole("Manager_Account_AddMoney"), @class = ckmenu("User", "TransferAccount") }))%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("点卡管理", "Index", "Cards", new { Authorize = us.IsInRole("Manager_Account_AddMoney"), @class = ckmenu("Cards", "Index") })%>
                    </td>
                </tr>
            </table>
        </div>
        <div class="left_menu_bar">
            系统设置
        </div>
        <div id="left_menu_sub_5" class="left_menu_sub">
            
            <table width="100%" border="0">
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("系统设置", "Option", "Site", new { Authorize=us.IsInRole("Manager_Site_SysOption") , @class = ckmenu("Site", "Option") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("清除数据", "ClearData", "Site", new {Authorize=us.IsInRole("Manager_Site_ClearData") , @class = ckmenu("Site", "ClearData") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("支付接口", "Pay", "Site", new { id = "" }, new {Authorize=us.IsInRole("Manager_Site_Pay") , @class = ckmenu("Site", "Pay") }) %>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("模式设置", "Model", "Site", new {Authorize=us.IsInRole("Manager_Site_SysOption") , @class = ckmenu("Site", "Model") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("公告管理", "Notice", "Site", new {Authorize=us.IsInRole("Manager_Site_Notice") , @class = ckmenu("Site", "Notice") ?? ckmenu("Site", "EditNotice") })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("功能设置", "Index", "Authorization", new {Authorize=us.IsInRole("Manager_Site_Authority") , @class = ckmenu("Authorization", "Index") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%">
                        <%=Html.ActionLink("登录日志", "LoginLog", "Site", new { Authorize = us.IsInRole("Manager_Site_ClearData"), @class = ckmenu("Site", "LoginLog")  })%>
                    </td>
                    <td width="49%">
                        <%=Html.ActionLink("权限管理", "Role", "Authorization", new { Authorize = us.IsInRole("Manager_Site_Authorization"), @class = ckmenu("Authorization", "Role") ?? ckmenu("Authorization", "Add") ?? ckmenu("Authorization", "Edit") })%>
                    </td>
                </tr>
                <tr>
                    <td width="49%" class="singleitem">
                        <%=Html.ActionLink("管理员设置", "Index", "Manager", new { Authorize = us.IsInRole("Manager_Site_Authorization"), @class = ckmenu("Manager", "Index") ?? ckmenu("Manager", "Add") ?? ckmenu("Manager", "Edit") })%>
                    </td>
                    <td width="49%">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>